﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Factory_Core="clr-namespace:BadHabit.Factory;assembly=FactoryCore"
    xmlns:BadHabit_Factory_Converters="clr-namespace:BadHabit.Factory.Converters"
    xmlns:BadHabit_WPFTools_Converters="clr-namespace:BadHabit.WPFTools.Converters;assembly=BadHabit.WPFTools"
    
    xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options">
    
    <BadHabit_Factory_Converters:TaskImageConverter x:Key="TaskImageConverter"/>
    <BadHabit_WPFTools_Converters:EnumConverter x:Key="EnumConverter"/>
    <BadHabit_WPFTools_Converters:LocalizeConverter x:Key="LocalizeConverter"/>
    

    <!-- IMAGES ===================================================================================-->

    <Style x:Key="RiskImpactImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <Setter Property="ToolTip" Value="{Binding ., Converter={StaticResource LocalizeConverter}}"/>
        <Style.Triggers>
            
            <DataTrigger Binding="{Binding}" Value="NONE">
                <Setter Property="Source" Value="/Images/RiskIndicators/GreenSquare.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}" Value="LOW">
                <Setter Property="Source" Value="/Images/RiskIndicators/BlueSquare.png"/>                
            </DataTrigger>
            <DataTrigger Binding="{Binding}" Value="MEDIUM">
                <Setter Property="Source" Value="/Images/RiskIndicators/YellowSquare.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}" Value="HIGH">
                <Setter Property="Source" Value="/Images/RiskIndicators/RedSquare.png"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="TaskStatusImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <Setter Property="ToolTip" Value="{Binding ., Converter={StaticResource LocalizeConverter}}"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding}" Value="TASK_DONE">
                <Setter Property="Source" Value="/Images/TaskStatus/32x32/Task_Done.png"/>
                <Setter Property="Visibility" Value="Visible"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}" Value="TASK_CANCELED">
                <Setter Property="Source" Value="/Images/TaskStatus/32x32/Task_Canceled.png"/>
                <Setter Property="Visibility" Value="Visible"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}" Value="TASK_WORKINGON">
                <Setter Property="Source" Value="/Images/TaskStatus/32x32/Task_Workingon.png"/>
                <Setter Property="Visibility" Value="Visible"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="TaskIsCanceledImage" TargetType="Image">
        <Setter Property="Stretch" Value="None"/>
        <Style.Triggers>        
            <DataTrigger Binding="{Binding Converter={StaticResource EnumConverter}, ConverterParameter={x:Type Factory_Core:TaskStatus}}" Value="TASK_CANCELED">
                <Setter Property="Source" Value="/Images/TaskStatus/32x32/Task_Canceled.png"/>
            </DataTrigger>

        </Style.Triggers>
    </Style>

    <Style x:Key="TaskTypeImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <Setter Property="ToolTip" Value="{Binding ., Converter={StaticResource LocalizeConverter}}"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding}" Value="DEVELOPING_BUG">
                <Setter Property="Source" Value="/Images/TaskType/32x32/DEVELOPING_BUG.png"/>                
            </DataTrigger>
            <DataTrigger Binding="{Binding}" Value="AFTER_DELIVERY_BUG">
                <Setter Property="Source" Value="/Images/TaskType/32x32/AFTER_DELIVERY_BUG.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}" Value="IMPEDIMENT">
                <Setter Property="Source" Value="/Images/TaskType/32x32/IMPEDIMENT.png"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
    
    <Style x:Key="TaskIsBugImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding}" Value="1">
                <Setter Property="Source" Value="/Images/TaskType/16x16/DEVELOPING_BUG.png"/>
                <Setter Property="Visibility" Value="Visible"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}" Value="2">
                <Setter Property="Source" Value="/Images/TaskType/16x16/AFTER_DELIVERY_BUG.png"/>
                <Setter Property="Visibility" Value="Visible"/>
            </DataTrigger>

        </Style.Triggers>
    </Style>

    <Style x:Key="TaskAlertImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Margin" Value="0,0,4,0"/>
        <Style.Triggers>
            

            <DataTrigger Value="0"  Binding="{Binding PlannedFinish,Converter={StaticResource TaskImageConverter}}">                
                <!--<Setter Property="Source" Value="/Images/Icons/taskAlert0.gif"/>-->
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
            <DataTrigger Value="1"  Binding="{Binding PlannedFinish, Converter={StaticResource TaskImageConverter}}">                
                <!--<Setter Property="Source" Value="/Images/Icons/taskAlert1.gif"/>-->
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
            <DataTrigger Value="2"  Binding="{Binding PlannedFinish,Converter={StaticResource TaskImageConverter}}">                
                <!--<Setter Property="Source" Value="/Images/Icons/taskAlert2.gif"/>-->
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
            <DataTrigger Value="3" Binding="{Binding PlannedFinish, Converter={StaticResource TaskImageConverter}}">                
                <!--<Setter Property="Source" Value="/Images/Icons/taskAlert3.gif"/>-->
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding Status}" Value="2">
                <!--<Setter Property="Source" Value="/Images/Icons/taskAlert0.gif"/>-->
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>

            <DataTrigger Binding="{Binding TaskUId}"  Value="00000000-0000-0000-0000-000000000000">
                <Setter Property="Source" Value="/Images/Icons/coffe.png"/>
                <Setter Property="Visibility" Value="Visible"/>
            </DataTrigger>
            

        </Style.Triggers>
    </Style>


    <Style x:Key="TaskIsLateAlertImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>                
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding Path=PlannedFinish, Converter={StaticResource TaskImageConverter}}" Value="3"/>
                    <Condition Binding="{Binding Path=Status}" Value="0"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="Source" Value="/Images/Icons/taskAlert3.gif" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding Path=PlannedFinish, Converter={StaticResource TaskImageConverter}}" Value="3"/>
                    <Condition Binding="{Binding Path=Status}" Value="1"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="Source" Value="/Images/Icons/taskAlert3.gif" />
            </MultiDataTrigger>
            
        </Style.Triggers>
    </Style>

    <Style x:Key="BacklogItemStatusImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <!--<Setter Property="Width" Value="16"/>
        <Setter Property="Height" Value="16"/>-->
        <Style.Triggers>
            <DataTrigger Binding="{Binding}"  Value="0">
                <Setter Property="Source" Value="/Images/BacklogItemStatus/Item.png"/>
                <Setter Property="ToolTip" Value="Required item"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="1">
                <Setter Property="Source" Value="/Images/BacklogItemStatus/ItemWorking.png"/>
                <Setter Property="ToolTip" Value="Working item"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="2">
                <Setter Property="Source" Value="/Images/BacklogItemStatus/ItemDone.png"/>
                <Setter Property="ToolTip" Value="Done item"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="3">
                <Setter Property="Source" Value="/Images/BacklogItemStatus/ItemCanceled.png"/>
                <Setter Property="ToolTip" Value="Canceled/Rejected item"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>



    <Style x:Key="ProposalStatusImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding}"  Value="0">
                <Setter Property="Source" Value="/Images/ProposalStatus/proposal.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="1">
                <Setter Property="Source" Value="/Images/ProposalStatus/proposal.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="2">
                <Setter Property="Source" Value="/Images/ProposalStatus/proposal.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="3">
                <Setter Property="Source" Value="/Images/ProposalStatus/proposalApproved.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="4">
                <Setter Property="Source" Value="/Images/ProposalStatus/proposalRejected.png"/>
            </DataTrigger>            
        </Style.Triggers>
    </Style>


    <Style x:Key="ProjectStatusImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <Setter Property="Width" Value="32"/>
        <Setter Property="Height" Value="32"/>
        <Setter Property="ToolTip" Value="{Binding ., Converter={StaticResource LocalizeConverter}}"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding}"  Value="0">
                <Setter Property="Source" Value="/Images/ProjectStatus/prjOportunity.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="1">
                <Setter Property="Source" Value="/Images/ProjectStatus/prjOportunity.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="2">
                <Setter Property="Source" Value="/Images/ProjectStatus/prjWaiting.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="3">
                <Setter Property="Source" Value="/Images/ProjectStatus/prjApproved.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="4">
                <Setter Property="Source" Value="/Images/ProjectStatus/prjRejected.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="5">
                <Setter Property="Source" Value="/Images/ProjectStatus/prjRunning.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="6">
                <Setter Property="Source" Value="/Images/ProjectStatus/prjRunning.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="7">
                <Setter Property="Source" Value="/Images/ProjectStatus/prjRunning.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="8">
                <Setter Property="Source" Value="/Images/ProjectStatus/prjDone.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="9">
                <Setter Property="Source" Value="/Images/ProjectStatus/prjCanceled.png"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="10">
                <Setter Property="Source" Value="/Images/ProjectStatus/prjCanceled.png"/>
            </DataTrigger>            
        </Style.Triggers>
    </Style>

    

    <Style x:Key="RoleTypeImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding}"  Value="TEAM">
                <Setter Property="Source" Value="/Images/RoleType/team.gif"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="SCRUM_MASTER">
                <Setter Property="Source" Value="/Images/RoleType/ScrumMaster.gif"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="PRODUCT_OWNER">
                <Setter Property="Source" Value="/Images/RoleType/productowner.gif"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="TEAM">
                <Setter Property="Source" Value="/Images/RoleType/team.gif"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="QUALITY_ASSURANCE">
                <Setter Property="Source" Value="/Images/RoleType/qualityassurance.gif"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="FACTORY_OWNER">
                <Setter Property="Source" Value="/Images/RoleType/FactoryOwner.gif"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="COMMERCIAL_GUY">
                <Setter Property="Source" Value="/Images/RoleType/CommercialGuy.gif"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="PRODUCT_OWNER">
                <Setter Property="Source" Value="/Images/RoleType/productOwner.gif"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding}"  Value="CLIENT_CONTACT">
                <Setter Property="Source" Value="/Images/RoleType/productOwner.gif"/>
            </DataTrigger>
            
        </Style.Triggers>
    </Style>

    <Style x:Key="BacklogFilterImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding}" Value="FULL_BACKLOG">
                <Setter Property="Source" Value="/Images/ToolBar/FullBacklog.png"/>                
            </DataTrigger>
            <DataTrigger Binding="{Binding}" Value="SELECTED_BACKLOG">
                <Setter Property="Source" Value="/Images/ToolBar/Sprint.png"/>                
            </DataTrigger>
            <DataTrigger Binding="{Binding}" Value="PLANNED_BACKLOG">
                <Setter Property="Source" Value="/Images/ToolBar/Plan.png"/>
            </DataTrigger>

        </Style.Triggers>
    </Style>

    <Style x:Key="VerifiedImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <Setter Property="ToolTip" Value="Item was verified"/>
        <Setter Property="Source" Value="/Images/BacklogItemStatus/ItemVerified.png"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding VerifiedDate}" Value="{x:Null}">
                <Setter Property="Image.Visibility" Value="Collapsed"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
    <Style x:Key="ValidatedImage" TargetType="Image">
        <Setter Property="Stretch" Value="Uniform"/>
        <Setter Property="ToolTip" Value="Item was validated"/>
        <Setter Property="Source" Value="/Images/BacklogItemStatus/ItemValidated.png"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding ValidatedDate}" Value="{x:Null}">
                <Setter Property="Image.Visibility" Value="Collapsed"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
    



</ResourceDictionary>